import axios from './http'

//登录
export const doLogin = data => axios.post('/oper/dologin',data)

//获取用户列表
export const selectuser = params => axios.get('/oper/selectuser',{params})

//获取用户信息
export const getuserinfo = params => axios.get('/oper/getuserinfo',{params})

//获取比赛列表
export const selectcptt = params => axios.get('/oper/selectcptt',{params})

//获取比赛详情
export const getcpttinfo = params => axios.get('/oper/getcpttinfo',{params})

//查ip
export const getip = () => axios.get('/selectip').then(e=>{
  const [,cip,cid,cname] = /"cip": "(.*)", "cid": "(.*)", "cname": "(.*)"/.exec(e)
  return {ip:cip,id:cid,name:cname}
}).catch(()=>{})


